package com.headStorm.hutooluse;

import cn.hutool.core.swing.DesktopUtil;
import cn.hutool.core.swing.RobotUtil;
import cn.hutool.core.swing.ScreenUtil;

import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;

/**
 * @author zhangqq
 * @create 2021-10-23 9:31
 **/
public class ScreenUtilDemo {

    public static void main(String[] args) {
        Rectangle screenRect = new Rectangle(500, 0, 100, 100);
        RobotUtil.captureScreen(screenRect, new File("d://l.jpg"));

        DesktopUtil.open(new File("d://l.jpg"));
        DesktopUtil.browse("http://www.baidu.com");
    }
}
